package com.framework.loippi.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.framework.loippi.dao.PatientDao;
import com.framework.loippi.entity.Patient;
import com.framework.loippi.service.PatientService;
import java.util.List;
/**
 * SERVICE - Patient(患者表)
 * 
 * @author wmj
 * @version 2.0
 */
@Service
public class PatientServiceImpl extends GenericServiceImpl<Patient, Long> implements PatientService {
	
	@Autowired
	private PatientDao patientDao;
	
	
	@Autowired
	public void setGenericDao() {
		super.setGenericDao(patientDao);
	}

	public List<Patient> findListByPage(Object parameter){
		return patientDao.findListByPage(parameter);
	}

	public Long deletes(Object parameter){
		return patientDao.deletes( parameter);
	}

	@Override
	public List<Patient> findAllByUserId(Integer userId) {
		return patientDao.findAllByUserId(userId);
	}

	@Override
	public Patient getPatientByImUserId(Long imUserId) {
		return  patientDao.getPatientByImUserId(imUserId);
	}


}
